<center><img src="rel_frota.png"/></center><br /><br />

<!-- calendar stylesheet -->
<link rel="stylesheet" type="text/css" media="all" href="jscalendar-0.9.3/calendar-win2k-cold-1.css" title="win2k-cold-1" />

<!-- main calendar program -->
<script type="text/javascript" src="jscalendar-0.9.3/calendar.js"></script>

<!-- language for the calendar -->
<script type="text/javascript" src="jscalendar-0.9.3/lang/calendar-en.js"></script>

<!-- the following script defines the Calendar.setup helper function, which makes
     adding a calendar a matter of 1 or 2 lines of code. -->
<script type="text/javascript" src="jscalendar-0.9.3/calendar-setup.js"></script>

<fieldset style="line-height: 230%;">
    <form name="rel_tempo_ocioso" action="pdf_tempo_ocioso.php" target="_BLANK" method="POST">
        <b>Placa:</b>
        <select name="placa" style="min-width: 150px" onchange="Execplaca(this.value)"> <br />
            <?php
            $sql = "SELECT placa FROM frota WHERE viagem = '1' ORDER BY placa";
            $query = mysql_query($sql);
            echo "<option value = '*' > * </option>";
            while ($dados = mysql_fetch_array($query)) {
                echo "<option id='valor_placa' value = " . $dados ['placa'] . ">" . $dados ['placa'] . "</option>";
            }
            ?>        
        </select><br />
        <b>Motorista da entrada:</b>
        <select id="motorista_entrada" name="motorista_entrada" style="min-width: 150px"> <br />
            <?php
            $sql = "SELECT nome FROM motorista ORDER BY nome";
            $query = mysql_query($sql);
            echo "<option value = '*' > * </option>";

            while ($dados = mysql_fetch_array($query)) {
                echo '<option value = "' . $dados["nome"] . '">' . $dados["nome"] . '</option>';
            }
            ?>        
        </select><br />
        <b>Motorista da saída:</b>
        <select id="motorista_saida" name="motorista_saida" style="min-width: 150px"> <br />
            <?php
            $sql = "SELECT nome FROM motorista ORDER BY nome";
            $query = mysql_query($sql);
            echo "<option value = '*' > * </option>";

            while ($dados = mysql_fetch_array($query)) {
                echo '<option value = "' . $dados["nome"] . '">' . $dados["nome"] . '</option>';
            }
            ?>        
        </select><br />
        <b>Data inicial da entrada:</b>
        <input id="dt_entrada_ini" type="text" name="dt_entrada_ini" size="20" value='01/01/2011' onKeyUp="barra(this)" onBlur="VerificaData(this.value)"/>
        <img src="imagens/calendario.png" id="dt_cal1" style="cursor: pointer" title="Date selector"
      onmouseover="this.style.background='red';" onmouseout="this.style.background=''" /><br />
        <script type="text/javascript">
            Calendar.setup({
                inputField     :    "dt_entrada_ini",      // id of the input field
                ifFormat       :    "dd/mm/y",       // format of the input field
                button         :    "dt_cal1",   // trigger for the calendar (button ID)
                singleClick    :    true            // double-click mode
            });
        </script>

        <b>Data final da entrada:</b>
        <input id="dt_entrada_fim" type="text" name="dt_entrada_fim" size="20" value='<?php echo date('d/m/Y') ?>' onKeyUp="barra(this)" onBlur="VerificaData(this.value)"/>
        <img src="imagens/calendario.png" id="dt_cal2" style="cursor: pointer" title="Date selector"
      onmouseover="this.style.background='red';" onmouseout="this.style.background=''" /><br />
        <script type="text/javascript">
            Calendar.setup({
                inputField     :    "dt_entrada_fim",      // id of the input field
                ifFormat       :    "dd/mm/y",       // format of the input field
                button         :    "dt_cal2",   // trigger for the calendar (button ID)
                singleClick    :    true            // double-click mode
            });
        </script><br />
        <input type="submit" id="gerar" value="Gerar" />
    </form>
</fieldset>